from public.tools import *
from public.action import *
from public.testDATE import *

from selenium.webdriver.common.keys import Keys
testCase="DBshop018_删除添加的属性组"
SX="好好学习"

firefox=openB(adminurl)
adminlogin(firefox)
menuu3(firefox,"商品管理","商品属性","属性分组")

# 1.点击“删除”按钮，确认删除，删除成功。
firefox.find_element_by_xpath("//tr/td[text()='%s']/following-sibling::td[2]/a[2]" % SX).click()

try:
    firefox.find_element_by_xpath("//tr/td[text()='%s']" % SX)
    writeLog("%s 测试失败"% testCase)
except:
    writeLog("%s 测试通过" % testCase)
    getPhoto(firefox)
firefox.quit()